<!DOCTYPE html>

<html>
<head>
  <style>
    .container {
      -webkit-perspective: 500px;
    }
    .set {
      position: absolute;
      top: 8px;
    }
    .box {
      height: 100px;
      width: 100px;
    }
    
    .hidden {
      visibility: hidden;
    }

    .visible {
      visibility: visible;
    }

    .should-be-visible {
      background-color: green !important;
    }
    .composited {
      transform: rotate3d(0, 0, 1, 45deg);
    }
    
    .hidden-indicator {
      background-color: red;
    }
    
    .intermediate {
      transform: rotate3d(0, 0, 1, -45deg);
      -webkit-transform-style: preserve-3d;
      background-color: red;
    }
  </style>
</head>
<body>
  <!-- Tests that a transform on a hidden div affects its visible children. -->
  <!-- You should see a single green box, with no red. -->

  <div class="set">
    <div class="hidden-indicator box"></div>
  </div>

  <div class="set">
    <div class="container">
      <div class="hidden intermediate">
        <div class="visible composited box should-be-visible"></div>
      </div>
    </div>

  </div>
</body>
</html>
